🎖️GitЯра🎖️
.github/workflows/main-check.yml gh-readonly-queue/main/pr-6178-ec5f1f249e8d44dd1ec1ede7e4523c75df7a94fe (b5ce69ea) Text, 4.45 KB
Tff7b72nameTb4b4b4: Ta5d6ffMainTa5d6ff Ta5d6ffCITa5d6ff Ta5d6ff(VerifyTa5d6ff Ta5d6ff&Ta5d6ff Ta5d6ffBuild)
Tff7b72onTb4b4b4:
Tff7b72pushTb4b4b4:
Tff7b72branchesTb4b4b4: Tb4b4b4[ Te6edf3main Tb4b4b4]
Tff7b72paths-ignoreTb4b4b4:
Tb4b4b4- Ta5d6ff'Ta5d6ff**/*.mdTa5d6ff'
Tb4b4b4- Ta5d6ff'Ta5d6ffdocs/**Ta5d6ff'
Tff7b72permissionsTb4b4b4:
Tff7b72contentsTb4b4b4: Ta5d6ffread
Tff7b72concurrencyTb4b4b4:
Tff7b72groupTb4b4b4: Ta5d6ffmain-${{Ta5d6ff Ta5d6ffgithub.refTa5d6ff Ta5d6ff}}
Tff7b72cancel-in-progressTb4b4b4: Ta5d6fftrue
Tff7b72jobsTb4b4b4:
T8b949e# Every commit on main arrives via the merge queue, which already ran lint, tests,
T8b949e# screenshot validation, and rb-check on this exact merge commit. Re-running them here
T8b949e# would be pure duplication — this workflow builds the debug APKs for the snapshot
T8b949e# release below (run_lint: false also skips screenshot-check and rb-check) plus the
T8b949e# desktop distributables. Desktop packaging runs here post-merge rather than in the
T8b949e# merge queue: :desktopApp:test in the queue's shard-app already covers compilation,
T8b949e# and the 4-OS matrix (macos/windows queue times) would slow every merge.
Tff7b72validate-and-buildTb4b4b4:
Tff7b72ifTb4b4b4: Ta5d6ffgithub.repositoryTa5d6ff Ta5d6ff==Ta5d6ff Ta5d6ff'meshtastic/Meshtastic-Android'
Tff7b72usesTb4b4b4: Ta5d6ff./.github/workflows/reusable-check.yml
Tff7b72withTb4b4b4:
Tff7b72run_lintTb4b4b4: Ta5d6fffalse
Tff7b72run_unit_testsTb4b4b4: Ta5d6fffalse
Tff7b72run_desktop_buildsTb4b4b4: Ta5d6fftrue
Tff7b72upload_artifactsTb4b4b4: Ta5d6fftrue
Tff7b72secretsTb4b4b4: Ta5d6ffinherit
T8b949e# Republishes the debug APKs validate-and-build already produced as a rolling "snapshot"
T8b949e# prerelease that moves to HEAD on every push to main, so testers get a stable download
T8b949e# link instead of digging through Actions artifacts (which require a GitHub login and
T8b949e# expire after 7 days).
Tff7b72publish-snapshotTb4b4b4:
Tff7b72needsTb4b4b4: Ta5d6ffvalidate-and-build
T8b949e# !cancelled(): a desktop-matrix failure fails validate-and-build as a whole, but the
T8b949e# Android APKs may still have built fine — attempt the snapshot regardless. If the
T8b949e# APK build itself failed, the artifact download below fails and this job goes red.
Tff7b72ifTb4b4b4: Ta5d6ffgithub.repositoryTa5d6ff Ta5d6ff==Ta5d6ff Ta5d6ff'meshtastic/Meshtastic-Android'Ta5d6ff Ta5d6ff&&Ta5d6ff Ta5d6ff!cancelled()
Tff7b72runs-onTb4b4b4: Ta5d6ffubuntu-24.04-arm
Tff7b72permissionsTb4b4b4:
Tff7b72contentsTb4b4b4: Ta5d6ffwrite
Tff7b72envTb4b4b4:
T8b949e# CROWDIN_GITHUB_TOKEN (a PAT), not the default GITHUB_TOKEN, because the repo's tag
T8b949e# rulesets block the default token from creating/deleting tags — same token every other
T8b949e# tag-touching workflow here uses.
Tff7b72GH_TOKENTb4b4b4: Ta5d6ff${{Ta5d6ff Ta5d6ffsecrets.CROWDIN_GITHUB_TOKENTa5d6ff Ta5d6ff}}
Tff7b72stepsTb4b4b4:
Tb4b4b4- Tff7b72nameTb4b4b4: Ta5d6ffCheckoutTa5d6ff Ta5d6ffcode
Tff7b72usesTb4b4b4: Ta5d6ffactions/checkout@v7.0.1
Tff7b72withTb4b4b4:
Tff7b72fetch-depthTb4b4b4: Ta5d6ff0 T8b949e# git rev-list --count needs full history for the versionCode
Tff7b72tokenTb4b4b4: Ta5d6ff${{Ta5d6ff Ta5d6ffsecrets.CROWDIN_GITHUB_TOKENTa5d6ff Ta5d6ff}}
Tff7b72persist-credentialsTb4b4b4: Ta5d6fffalse T8b949e# no git push here; gh does the authed work via GH_TOKEN
Tb4b4b4- Tff7b72nameTb4b4b4: Ta5d6ffDownloadTa5d6ff Ta5d6ffdebugTa5d6ff Ta5d6ffAPKs
Tff7b72usesTb4b4b4: Ta5d6ffactions/download-artifact@v8
Tff7b72withTb4b4b4:
Tff7b72nameTb4b4b4: Ta5d6ffapp-debug-apks
Tff7b72pathTb4b4b4: Ta5d6ffartifacts
T8b949e# A moving tag reuses the same release URL forever, and Obtainium fingerprints the
T8b949e# asset URL — so without a changing filename it would never detect a new build.
T8b949e# Embed the (monotonic) versionCode in each APK name; same formula the app build uses.
Tb4b4b4- Tff7b72nameTb4b4b4: Ta5d6ffRenameTa5d6ff Ta5d6ffAPKsTa5d6ff Ta5d6ffwithTa5d6ff Ta5d6ffversionCode
Tff7b72runTb4b4b4: Tb4b4b4|
Tff7b72COMMIT_COUNT=$(git rev-list --count HEAD)
Tff7b72OFFSET=$(grep '^VERSION_CODE_OFFSET=' config.properties | cut -d'=' -f2)
Tff7b72VERSION_CODE=$((COMMIT_COUNT + OFFSET))
Tff7b72echo "VERSION_CODE=$VERSION_CODE" >> "$GITHUB_ENV"
Tff7b72mkdir -p upload
Tff7b72find artifacts -name '*.apk' | while read -r f; do
Tff7b72cp "$f" "upload/$(basename "$f" .apk)-${VERSION_CODE}.apk"
Tff7b72done
Tff7b72ls -l upload
T8b949e# Delete the previous snapshot release AND its tag, then recreate both at HEAD. This
T8b949e# prunes the now-stale (differently-named) APKs so they don't pile up, and sidesteps the
T8b949e# Releases API refusing to retarget an already-existing tag.
Tb4b4b4- Tff7b72nameTb4b4b4: Ta5d6ffRemoveTa5d6ff Ta5d6ffpreviousTa5d6ff Ta5d6ffsnapshotTa5d6ff Ta5d6ffrelease
Tff7b72runTb4b4b4: Ta5d6ffghTa5d6ff Ta5d6ffreleaseTa5d6ff Ta5d6ffdeleteTa5d6ff Ta5d6ffsnapshotTa5d6ff Ta5d6ff--yesTa5d6ff Ta5d6ff--cleanup-tagTa5d6ff Ta5d6ff||Ta5d6ff Ta5d6fftrue
Tb4b4b4- Tff7b72nameTb4b4b4: Ta5d6ffPublishTa5d6ff Ta5d6ffsnapshotTa5d6ff Ta5d6ffrelease
Tff7b72runTb4b4b4: Tb4b4b4|
Tff7b72cat > notes.md <<EOF
Tff7b72Automated debug build from the latest commit on \`main\` ($GITHUB_SHA), versionCode $VERSION_CODE.
Tff7b72Unsigned/debug-keyed, F-Droid and Google flavors. Not for production use — this release is replaced on every push to main.
Tff7b72**Obtainium:** enable *Include prereleases*. Each build's APK filename carries the versionCode, so updates are detected.
Tff7b72EOF
Tff7b72gh release create snapshot upload/*.apk \
Tff7b72--title "Snapshot $VERSION_CODE ($GITHUB_SHA)" \
Tff7b72--target "$GITHUB_SHA" \
Tff7b72--prerelease \
Tff7b72--notes-file notes.md
Served by rngit 1.5.2 - Generated in 0.06s